<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<script type="text/javascript">
 $(function(){
	//初始化表单验证
	$("#addForm").validate({
		rules: {
			gbprice: {isMoney: true},
			zspointnum:{isMoney: true},
			zsdedunum:{isMoney: true},
			zscouponnum:{isMoney: true},
			sellPrice: {isMoney: true},
			sellerprice: {isMoney: true},
			oppoint: {isMoney: true},
			opdedu: {isMoney: true},
			opcoupon: {isMoney: true},
			marketPrice:{isMoney: true},
/* 			stock:{digits: true}, */		
			zdsx:{digits: true},
			countnum:{digits: true},
			yyts:{digits: true},
			jyrs:{digits: true},
			zdrs:{digits: true},	
		},
		messages: {
			name: {required: "请输入商品标题"},
			gbprice: {required: "请输入团购销售价",isMoney: "请填写正确的金额，最多保留两位小数位"},
			zspointnum: {required: "请输入数字",isMoney: "请填写正确的积分值，最多保留两位小数位"},
			zsdedunum: {required: "请输入抵扣券",isMoney: "请填写正确的积分值，最多保留两位小数位"},
			zscouponnum: {required: "请输入优惠券",isMoney: "请填写正确的积分值，最多保留两位小数位"},
			
			sellPrice: {required: "请输入商品市场售价",isMoney: "请填写正确的金额，最多保留两位小数位"},
			sellerprice: {required: "请输入支付金额",isMoney: "请填写正确的支付金额，最多保留两位小数位"},
			
			oppoint: {required: "请输入数字",isMoney: "请填写正确的积分值，最多保留两位小数位"},
			opdedu: {required: "请输入数字",isMoney: "请填写正确的积分值，最多保留两位小数位"},
			opcoupon: {required: "请输入数字",isMoney: "请填写正确的积分值，最多保留两位小数位"},

			
			marketPrice: {required: "请输入价值",isMoney: "请填写正确的价值，最多保留两位小数位"},
			
		/* 	stock: {required: "请输入商品库存",digits: "请填写正确的数量"}, */
			countnum: {required: "请输入商品库存",digits: "请填写正确的数量"},
			zdsx: {required: "请输入正确的指定上限",digits: "请填写正确的数量"},
			yyts: {required: "请输入商品库存",digits: "请填写正确的数量"},
			jyrs: {required: "请输入正确的建议",digits: "请填写正确的数量"},
			zdrs: {required: "请输入正确的指定人数",digits: "请填写正确的数量"},
			categoryonid: {required: "请选择一级分类"},
			categorytwid: {required: "请选择二级分类"},
			categorythid: {required: "请选择三级分类"},
			categoryfoid: {required: "请选择四级分类"}
		},
		submitHandler:function(form){
			$(form).ajaxSubmit({
				success:function(data){
					switch(data.flag){
					case 2:
						Kit.alert("请选择商品分类");return;
					case 3:
						Kit.alert("请添加分公司");return;
					case 4:
						Kit.alert("请添加商城价格");return;
					case 5:
						Kit.alert("请添加库存");return; 
					case 6:
						Kit.alert("请填写市场价格");return;
					case 7:
						Kit.alert("Logo图片不能为空！");return;
					case 8:
						Kit.alert("请添加价格");return;
					case 10:
						Kit.alert("请填写宝贝内容");return;
					case 11:
						Kit.alert("请填写规格内容");return;
					case 12:
						Kit.alert("请点击添加轮播图片，进行图片的添加！");return;
					case 13:
						Kit.alert("请点击添加详情图片，进行图片的添加！");return;
					case 14:
						Kit.alert("添加规格错误");return;
					case 15:
						Kit.alert("支付方式升级为多选，请联系程序员");return;
					case 16:
						Kit.alert("已选中赠送优惠，请选择赠送的积分值选项");return;
					case 17:
						Kit.alert("已选中赠送优惠类别，请填写积分值");return;
					case 18:
						Kit.alert("已选中支付金额，请填写金额");return;
					case 19:
						Kit.alert("已选中支付积分值，请填写积分值");return;
					case 20:
						Kit.alert("请至少选择一种支付方式");return;
					/* case -1:
						Kit.alert("网络繁忙...，请重试");return;  */
					case -1:
						dataPaginator.loadPage(1);
						addDialog.close();
						return;
					}
				}
			});
		}
	});
}); 

$(document).ready(function(){
    $("#addTable").click(function(){
       var tr="<tr><td style=\"font-size: 14px;text-align: center;\"><input type=\"checkbox\" name=\"check\" checked=\"checked\" />"+
              "</td><td style=\"font-size: 14px;text-align: center;\"><input type=\"text\" name=\"name\" maxlength=\"10\" style=\"width:195px;height:30px;\"/>"+
              "</td><td style=\"font-size: 14px;text-align: center;\"><input type=\"text\" name=\"number\" onkeyup=\"(this.vads=function(){this.value=this.value.replace(/[^0-9]+/,'');}).call(this)\" onblur=\"this.vads();\" style=\"width:195px;height:30px;\" />"+
              "</td><td style=\"font-size: 14px;text-align: center;\"><input type=\"text\" name=\"price\"  onkeyup=\"(this.vads=function(){this.value=this.value.replace(/[^0-9]+/-.,'');}).call(this)\" onblur=\"this.vads();\" style=\"width:195px;height:30px;\" />"+
              "</td></tr>";
              $("#tableb").append(tr);
    });
    $("#deleteTable").click(function(){
        var check = document.getElementsByName("check");
        for(var i=0;i<check.length;i++){
            if(check[i].checked){
                 document.getElementById('tableb').deleteRow(i);
                 i--;
            }
        }
    });
     $("#deleteTablea").click(function(){
        var check = document.getElementsByName("checks");
        var ths=check.length;
        var numb=parseFloat($("#chooseNum").html());
        for(var i=0;i<check.length;i++){
            if(check[i].checked){
                 document.getElementById('tablea').deleteRow(i);
                 i--;
                 numb--;
            }
        }
        $("#chooseNum").text((numb));
        $("#storeid").val((numb));
    })

})
  var addStoreDialog;
function addStore(){
	addStoreDialog = Kit.dialog("添加分公司","${BASE_PATH}/ecard/goods/chooseAllStore",{closable:true,size:'size-wide'}).open();
}  
function onStoreChoosed(id,title,address,tel){
	var trs= $("#tablea tr");
	var array=new Array();
	var numb=parseFloat($("#chooseNum").html());
	for (var i = 0; i < trs.length; i++) {
		var tds = $(trs[i]).children();
		var sid = $(tds[0]).find("#ids").val();
		array.push(sid);
	}
	if(contains(array,id)){
		alert("该分公司已添加");
	}else{
	 var tr="<tr><td style=\"font-size: 14px;text-align: center;\"><input type=\"checkbox\" id=\"ids\" checked=\"checked\" name=\"checks\" value='"+id+"'/>"+
     "</td><td style=\"font-size: 14px;text-align: center;\">"+title+
     "</td><td style=\"font-size: 14px;text-align: center;\">"+address+
     "</td><td style=\"font-size: 14px;text-align: center;\">"+tel+
     "</td></tr>";
     $("#tablea").append(tr);
     $("#chooseNum").text((numb+1));
     $("#storeid").val((numb+1));
	}
}
function contains(arr, obj) {  
    var i = arr.length;  
    while (i--) {  
        if (arr[i] === obj) {  
            return true;  
        }  
    }  
    return false;  
} 

$("#tbtd").hide();
$("#tbts").hide(); 
$("#bufen").hide();
$("#zdsx").hide();
$("#yyts").hide();
$("#jyrs").hide();
$("#xzrs").hide();
$("#gbattr").hide();
$("#zsnumattr").hide();
$("#gbfpperson").hide();
$("#zspointnum").hide();
$("#zsdedunum").hide();
$("#zscouponnum").hide();
$("#payonlyactivity").hide();
$("#oppoint").hide();
$("#opdedu").hide();
$("#opcoupon").hide();
$("#paymoneyandactivity").hide();



/* 是否团购 */
 $(".group").click(function(){
	var v = $('input[name="groupbuying"]').filter(':checked').val(); 
	if(v==1){
		$("#gbattr").hide();
	}else if(v==2){
		$("#gbattr").show();
		/* 团购方法 */	 
		$(".gmethod").click(function(){
			var vs = $('input[name="gbmethod"]').filter(':checked').val(); 
			if(vs==1){
				$("#gbfpperson").hide();
			}else if(vs==2){
				$("#gbfpperson").show();
			}else if(vs==3){
				$("#gbfpperson").show();
			}
		});
	}
}); 
/* 是否赠送优惠 */	 
$(".zactivity").click(function(){
	var v = $('input[name="zsactivity"]').filter(':checked').val(); 
	if(v==1){
		$("#zsnumattr").hide();
	}else if(v==2){
		$("#zsnumattr").show();
		var vz = $('input[name="zsactivity"]').filter(':checked').val(); 
		if(vz==1){
			$("#zsnumattr").hide();
		}else if(vz==2){
			$("#zsnumattr").show();
			$("#zsnumattr").click(function(){
				 var vsp = $('input[name="zspoint"]').filter(':checked').val(); 
				 if(vsp==1){
					 $("#zspointnum").show();
				 }else{
					 $("#zspointnum").hide();
					 $("#zspointnum").val("");
				 }
				 var vsd = $('input[name="zsdedu"]').filter(':checked').val(); 
				 if(vsd==1){
					 $("#zsdedunum").show();
				 }else{
					 $("#zsdedunum").hide();
					 $("#zsdedunum").val("");
				 }
				 var vsc = $('input[name="zscoupon"]').filter(':checked').val(); 
				 if(vsc==1){
					 $("#zscouponnum").show();
				 }else{
					 $("#zscouponnum").hide();
					 $("#zscouponnum").val("");
				 }		 
			});
		}	
	}
});
 $(".tuan").click(function(){
		var v = $('input[name="goods"]').filter(':checked').val(); 
		if(v==1){
			$("#tbts").hide();
		}else if(v==2){
			$("#tbts").show();
			 $("#tbts").click(function(){
				 var vs = $('input[name="times"]').filter(':checked').val(); 
				 if(vs==1){
					 $("#tbtd").hide();
				 }else{
					 $("#tbtd").show();
				 }
			 });
		}
	});
 $(".kysj").click(function(){
		var v = $('input[name="keyong"]').filter(':checked').val(); 
		if(v==1){
			$("#bufen").hide();
		}else if(v==2){
			$("#bufen").show();
		}
	});
 $(".gmsx").click(function(){
		var v = $('input[name="goumai"]').filter(':checked').val(); 
		if(v==1){
			$("#zdsx").hide();
		}else if(v==2){
			$("#zdsx").show();
		}
	});
 $(".xyyy").click(function(){
		var v = $('input[name="yuyue"]').filter(':checked').val(); 
		if(v==1){
			$("#yyts").hide();
		}else if(v==2){
			$("#yyts").show();
		}
	});
 $(".syrs").click(function(){
		var v = $('input[name="shiyongrenshu"]').filter(':checked').val(); 
		if(v==0){
			$("#jyrs").hide();
			$("#xzrs").hide();
			$("#jyrss").val("");
			$("#xzrss").val("");
		}else if(v==1){
			$("#jyrs").hide();
			$("#xzrs").hide();
			$("#jyrss").val("");
			$("#xzrss").val("");
		}else if(v==2){
			$("#jyrs").show();
			$("#xzrs").hide();
			$("#jyrss").val("");
			$("#xzrss").val("");
		}else{
			$("#jyrs").hide();
			$("#xzrs").show();
			$("#jyrss").val("");
			$("#xzrss").val("");
		}
	});
 var imagesDialogs;
 
 function toUploadImages(){
 	imagesDialogs = Kit.dialog("轮播图片","${BASE_PATH}/ecard/goods/imageIndex/${LunBoNum}",{closable:true,size:"size-wide"}).open();
 }
 var imagesXiang;

 function toXiang(){
 	imagesXiang = Kit.dialog("详情图片","${BASE_PATH}/ecard/goods/imageDetailIndex/${LunBoNum}",{closable:true,size:"size-wide"}).open();
 }
 


//DATE PICKER处理时间
 $('.datetimepicker').datetimepicker({
		  format:"yyyy-mm-dd",
		   startView:2,
			minView:2,
            language:  'zh-CN',
            weekStart: 1,
            todayBtn:  1,
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            forceParse: 1,
          showMeridian: 1,
           pickerPosition:'top-right'
      }).on('hide', function(event) {
           event.preventDefault();
         event.stopPropagation();
   });
    $("#sBeginDate").datetimepicker({
	    format: 'yyyy-mm-dd hh:ii:ss',
	    minuteStep:1,
	    minView:'hour',
	    language: 'zh-CN',
	    pickerPosition:'bottom-right',
	    autoclose:true,
	}).on("click",function(){
	    $("#sBeginDate").datetimepicker("setEndDate",$("#sEndDate").val());
	});

	$("#sEndDate").datetimepicker({
	    format: 'yyyy-mm-dd hh:ii:ss',
	    minuteStep:1,
	    minView:'hour',
	    language: 'zh-CN',
	    autoclose:true,
		}).on("click",function(){
			var d=$("#sBeginDate").val();
			var d1=new Date(d); 
			d1.setFullYear(d1.getFullYear()+1); 
			d1.setDate(d1.getDate()-1); 
			 $("#sEndDate").datetimepicker("setEndDate",d1);
			$("#sEndDate").datetimepicker("setStartDate",$("#sBeginDate").val());
		});
		
	 $(document).on("click","#sEndDate",function(){
	    	$('#sEndDate').datetimepicker('show');
	    });
   
   $(document).on("click","#sBeginDate",function(){
   	$('#sBeginDate').datetimepicker('show');
   }); 
   
   $("#beginDate").datetimepicker({
	    format: 'yyyy-mm-dd hh:ii:ss',
	    minuteStep:1,
	    minView:'hour',
	    language: 'zh-CN',
	    pickerPosition:'bottom-right',
	    autoclose:true,
	}).on("click",function(){
	    $("#beginDate").datetimepicker("setEndDate",$("#endDate").val());
	});

	$("#endDate").datetimepicker({
	    format: 'yyyy-mm-dd hh:ii:ss',
	    minuteStep:1,
	    minView:'hour',
	    language: 'zh-CN',
	    autoclose:true,
		}).on("click",function(){
			var d=$("#beginDate").val();
			var d1=new Date(d); 
			d1.setFullYear(d1.getFullYear()+1); 
			d1.setDate(d1.getDate()-1); 
			$("#endDate").datetimepicker("setEndDate",d1);
			$("#endDate").datetimepicker("setStartDate",$("#beginDate").val());
		});
		
	 $(document).on("click","#endDate",function(){
	    	$('#endDate').datetimepicker('show');
	    });
  
  $(document).on("click","#beginDate",function(){
  	$('#beginDate').datetimepicker('show');
  });
  
  //团购时间逻辑
  	var gbbegintime = $("#gbbegintime").val();
	var gbendtime = $("#gbendtime").val();
  $("#gbbegintime").datetimepicker({
	    format: 'yyyy-mm-dd hh:ii:ss',
	    minuteStep:1,
	    minView:'0',
	    language: 'zh-CN',
	    pickerPosition:'bottom-right',
	    autoclose:true,
	    todayBtn:true,
	    todayHighlight:true,
	}).on("click",function(){
	    $("#gbbegintime").datetimepicker("setEndDate",$("#gbendtime").val());
	});

	$("#gbendtime").datetimepicker({
	    format: 'yyyy-mm-dd hh:ii:ss',
	    minuteStep:1,
	    minView:'0',
	    language: 'zh-CN',
	    autoclose:true,
	    todayBtn:true,
	    todayHighlight:true,
		}).on("click",function(){
			var d=$("#gbbegintime").val();
			var d1=new Date(d); 
			d1.setFullYear(d1.getFullYear()+1); 
			d1.setDate(d1.getDate()-1); 
			$("#gbendtime").datetimepicker("setEndDate",d1);
			$("#gbendtime").datetimepicker("setStartDate",$("#gbbegintime").val());
		});


function deltTablElement(){
      var check = document.getElementsByName("specChecks");
      var ths=check.length;
      var numb=parseFloat($("#chooseSpecNum").html());
      for(var i=0;i<check.length;i++){
          if(check[i].checked){
               document.getElementById('tablespec').deleteRow(i);
               i--;
               numb--;
          }
      }
      $("#chooseSpecNum").text((numb));
      $("#specid").val((numb));
  }


//点击事件取下级的值
$("#categoryonid").change(function(){
	categoryonid=$("#categoryonid").val();
	  $.ajax({
           type: "POST",
           url: "${BASE_PATH}/ecard/goods/categoryonid",
           data: {"categoryonid" : categoryonid},
           dataType: "json",
           traditional: true,
           success: function(data){
			$("#categorytwid").empty();
			$("#categorytwid").append("<option value=''>请选择二级分类</option>");
			for(var i=0; i<data.object.length;i++){
				$("#categorytwid").append("<option value='"+data.object[i].categoryId+"'>"+data.object[i].categoryName+"</option>");
               }
           }
       });
    });
$("#categorytwid").change(function(){
	categorytwid=$("#categorytwid").val();
	  $.ajax({
           type: "POST",
           url: "${BASE_PATH}/ecard/goods/categorytwid",
           data: {"categorytwid" : categorytwid},
           dataType: "json",
           traditional: true,
           success: function(data){
          	   $("#categorythid").empty(); 
               $("#categorythid").append("<option value=''>请选择三级分类</option>");
               for(var i=0; i<data.object.length;i++){
              	 $("#categorythid").append("<option value='"+data.object[i].categoryId+"'>"+data.object[i].categoryName+"</option>");
               }
           }
       });
    });
$("#categorythid").change(function(){
	categorythid=$("#categorythid").val();
	  $.ajax({
           type: "POST",
           url: "${BASE_PATH}/bus/goods/base/categorythid",
           data: {"categorythid" : categorythid},
           dataType: "json",
           traditional: true,
           success: function(data){
          	   $("#categoryfoid").empty(); 
               $("#categoryfoid").append("<option value=''>请选择四级分类</option>");
               for(var i=0; i<data.object.length;i++){
              	 $("#categoryfoid").append("<option value='"+data.object[i].categoryId+"'>"+data.object[i].categoryName+"</option>");
               }
           }
       });
    });

</script> 
<form id="addForm" action="${BASE_PATH}/ecard/goods/doAdd" method="post" enctype="multipart/form-data" class="form-horizontal" style="">
	
	<div class="form-group"  style="margin-left: 20px">
		<label class=" control-label" style="margin-left: 50px;font-size: 18px;">商品基本信息</label>
		<span style="margin-left:10px; color:red;">(*)</span><span  style="margin-right:10px; ">标记的为必填项</span>
	</div>
	<hr style=" height:2px;border:none;border-top:2px solid black;" />
	<div class="form-group">
	    <label class="col-lg-2 control-label"><span style="margin-right:10px; color:red;">*</span>商品名称</label>
	    <div class="col-lg-9">
        	<input type="text" name="names" id="names" class="form-control" placeholder="请输入宝贝名称" required maxlength="40"><span>此处文字不多于40字</span>
	    </div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label"><span style="margin-right:10px; color:red;">*</span>商品主图</label>
		<div class="col-sm-10">
			<input type="file" id="goodsthumb" name="goodsthumb"  style="width:30%;" accept="image/jpg,image/png" title="添加商品Logo图">
		</div>
	</div>
	<div class="form-group">
	<label class="col-sm-2 control-label"><span style="margin-right:10px; color:red;">*</span>轮播图片</label>
		<div class="col-sm-10">
		 <input type='button' value='添加轮播图' onclick="toUploadImages();" style="background-color: #428bca;width: 89.81px;height: 32px;color: white;border: 2px solid;background-image: linear-gradient(to bottom,#5bc0de 0,#428bca 100%);"/> 
		</div>
		<div class="col-lg-offset-2 p-t-5 col-lg-9"><span class="text-success"></span></div>
	</div>
	<div class="form-group">
		<label class="col-lg-2 control-label"><span style="margin-right:10px; color:red;">*</span>商品类别</label>
		<div class="col-sm-2">
			<select name="categoryonid" id="categoryonid" class="form-control" required >
				<option value="">一级分类</option>
				<c:forEach items="${oneCategories}" var="category" varStatus="s">
					<option value="${category.categoryId}">${category.categoryName}</option>	
				</c:forEach>
			</select>
		</div>
	
		<div class="col-sm-2">
			<select name="categorytwid" id="categorytwid" class="form-control" required >
				<option value=""   >二级分类</option>
			</select>
		</div>
	
		<div class="col-sm-2">
			<select name="categorythid" id="categorythid" class="form-control" required >
				<option value=""   >三级分类</option>
			</select>
		</div>
	
		<div class="col-sm-2">
			<select name="categoryfoid" id="categoryfoid" class="form-control" required >
				<option value=""   >四级分类</option>
			</select>
		</div>
	</div>
	<div class="form-group">
		<label class="col-lg-2 control-label"><span style="margin-right:10px; color:red;">*</span>充值面额</label>
		<div class="col-lg-9">
			<input type="text" name="sellPrice" id="sellPrice" class="form-control" onkeyup="(this.v3=function(){this.value=this.value.replace(/[^0-9-.]+/,'');}).call(this)" onblur="this.v3();" placeholder="请输入商品市场价" />
		</div>
	</div>
	<div class="form-group">
		<label class="col-lg-2 control-label"><span style="margin-right:10px; color:red;">*</span>售价</label>
		<div class="col-lg-9">
			<input type="text" name="marketPrice" id="marketPrice" class="form-control" onkeyup="(this.v3=function(){this.value=this.value.replace(/[^0-9-.]+/,'');}).call(this)" onblur="this.v3();" placeholder="请输入商品商城价" />
		</div>
	</div>
	<div class="form-group">
		<label class="col-lg-2 control-label"><span style="margin-right:10px; color:red;">*</span>库存数量</label>
		<div class="col-lg-9">
			<input type="text" name="countnum" id="countnum" class="form-control" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" placeholder="请输入数字" />
		</div>
	</div>
	<div class="form-group">
		<label class="col-lg-2 control-label">商品货号</label>
		<div class="col-lg-9">
			<input type="text" id="goodsNum" name="goodsNum" class="form-control" placeholder="请输入第三方商品货号">
		</div>
	</div>

	<!-- 是否赠送优惠 -->
	<div class="form-group">
   	 <label class="col-lg-2 control-label"><span style="margin-right:10px; color:red;">*</span>赠送优惠</label>
	    <div class="col-lg-9 zactivity" >
	        <label><input name="zsactivity" type="radio" value="1" checked/>否   </label>
			<label><input name="zsactivity" type="radio" value="2" />是</label>
			<div style="margin-right: 30px;" id="zsnumattr">
				<label><input name="zspoint" type="checkbox" value="1" /> 积分值 
					<input type="text" name="zspointnum" id="zspointnum" size="12"  placeholder="请输入数字" /></label><br>
				<label><input name="zsdedu" type="checkbox" value="1" /> 抵扣券
					<input type="text" name="zsdedunum" id="zsdedunum" size="12"  placeholder="请输入数字" /></label><br>
				<label><input name="zscoupon" type="checkbox" value="1" /> 优惠券
					<input type="text" name="zscouponnum" id="zscouponnum" size="12" placeholder="请输入数字" /></label>
			</div>
   		</div>
   	</div>
	<div class="form-group">
	    <label class="col-lg-2 control-label"><span style="margin-right:10px; color:red;">*</span>适用分公司</label>
	    <div class="col-lg-9">
    		<input type="button" value="增加分公司" onclick="addStore();" style="background-color: #0080ff;color: white;border: 2px solid;background-image: linear-gradient(to bottom,#5bc0de 0,#428bca 100%);"/> <span>已选分公司(<span id="chooseNum" >0</span>)</span>
    		<input type='button' value='删除分公司' id='deleteTablea' style="background-color: #ff8080;color: white;border: 2px solid;background-image: linear-gradient(to bottom,#ff8080 0,#ff0000 100%);"/>
    		<input type="text" id="storeid" name="storeid" hidden="hidden" value="0"/>
	    </div>
   </div>
   <div class="form-group">
    	<label class="col-lg-2 control-label"></label>
	     <div class="col-lg-9">
	     	<table id="tablea" style="width: 100%" border="1">
     			<tr>
     				<th style=" width:5%;font-size: 14px;text-align: center;"><input type="checkbox" name="checks" hidden="hidden"/>选择</th>
     				<th style=" width:15%;font-size: 14px;text-align: center;">分公司名称</th>
     				<th style=" width:20%;font-size: 14px;text-align: center;">分公司地址</th>
     				<th style=" width:15%;font-size: 14px;text-align: center;">分公司电话</th>
     			</tr>
	     	</table>
	    </div>
	</div>


	<div class="form-group">
		<label class=" control-label" style="margin-left: 50px;font-size: 18px;">商品详情</label>
	</div>
		<hr style=" height:2px;border:none;border-top:2px solid black;"/>
	<div class="form-group">
	    <label class="col-lg-2 control-label">商品简介</label>
	    <div class="col-lg-9">
	        <textarea rows="5" cols="90" name="shortinfo" onchange="this.value=this.value.substring(0, 200)" onkeydown="this.value=this.value.substring(0, 200)" onkeyup="this.value=this.value.substring(0, 200)" id="shortinfo"></textarea>
	    </div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label"><span style="margin-right:10px; color:red;">*</span>详情图片</label>
		<div class="col-sm-10">
		 <input type='button' value='添加详情图片' onclick="toXiang();" style="background-color: #337ab7;width: 100px;height: 32px;color: white;border: 2px solid;background-image: linear-gradient(to bottom,#5bc0de 0,#428bca 100%);"/> 
		</div>
		<div class="col-lg-offset-2 p-t-5 col-lg-9"><span class="text-success"></span></div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">备注</label>
		<div class="col-sm-10">
	        <textarea rows="5" cols="90" name="beizhu" onchange="this.value=this.value.substring(0, 200)" onkeydown="this.value=this.value.substring(0, 200)" onkeyup="this.value=this.value.substring(0, 200)" ></textarea>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-6"><button class="btn btn-primary col-sm-3 pull-right" type="submit" >提交</button></div>
		<div class="col-lg-6"><button class="btn btn-default col-sm-3 pull-left"  type="button" onclick="javascript:addDialog.close();">取消</button></div>
	</div>
	<input type="hidden" name="LunBoNum"  value="${LunBoNum}"/>
	<input type="hidden" name="IntLun" id="IntLun" value="0"/>
	<input type="hidden" name="Intditl" id="Intditl"  value="0"/>
</form>


